function s2 = aggregate(s1,A)
	s2 = lpcvd_2DSurface();
	
	s2.x = s1.x(1:A:end)/A;
	s2.y = s1.y(1:A:end)/A;
	s2.site_width = s1.site_width*A;
	s2.site_width_unit = s1.site_width_unit;
	s2.layer_thickness = s1.layer_thickness;
	s2.layer_thickness_unit = s1.layer_thickness_unit;
	
	dim_s2 = length(s2.x);
	s2.h = zeros(dim_s2,dim_s2);
	for i = 1:dim_s2
		for j = 1:dim_s2
			s2.h(i,j) = mean(mean(s1.h((i-1)*A+1:i*A,(j-1)*A+1:j*A)));
		end
	end
end